@extends('layouts.admin')
@section('content')

<!--Side menu and right menu -->

<!-- main content -->
<section class="content home">
    <div class="container-fluid">
        <div class="block-header">
            <h2>内容管理</h2>
            <ol class="breadcrumb">
                <li><a href="/admin">首页</a></li>
                <li><a href="/admin/article">内容管理</a></li>
                <li><a href="/admin/apage">分类管理</a></li>
                <li class="active">编辑分类内容</li>
            </ol>
        </div>

        <div class="row clearfix">
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <div class="card">
                    <div class="header">
                        <h2> {{$apage->apage_title}} </h2>
                        <ul class="header-dropdown m-r--5">
                            <a href="{{ url()->previous() }}" title="返回上一页"> <i
                                    class="material-icons">arrow_back</i>
                            </a>
                            </li>
                        </ul>
                    </div>
                    <div class="body">
                        <form method="POST" action="">
                            <input type="hidden"  value="{{$apage->class_id}}" name="apage_id">
                            {{ csrf_field() }}
                            <label for="class_name">分类名称</label>
                            <div class="form-group">
                                <div class="form-line">
                                    <input type="text" id="class_name" class="form-control" name="class_name" maxlength="150" value="{{$apage->class_name}}">
                                </div>
                                @if ($errors->has('class_name'))
                                <label id="name-error" class="error" for="class_name">{{ $errors->first('class_name') }}</label>
                                @endif

                            </div>
                            <label class="control-label" for="class_keyword">关键字</label>
                            <div class="form-group ">
                                <div class="form-line">
                                    <input type="text" id="class_keyword" class="form-control" name="class_keyword" value="{{$apage->class_keyword}}" maxlength="150">
                                </div>
                            </div>
                            <label  for="class_sort">排序</label>
                            <div class="form-group">
                                <div class="form-line">
                                    <input type="text" id="class_sort" class="form-control" value="{{$apage->class_sort}}" name="class_sort">
                                </div>
                            </div>
                            <div class="hidden-print">
                                <div class="pull-right">
                                    <button type="reset" class="btn  btn-raised bg-grey waves-effect">重置内容</button>
                                    <button type="submit" class="btn  btn-raised btn-success waves-effect">更新分类
                                    </button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
@endsection
@push('header-css')
<link href="{{ asset('assets/plugins/redactor2/redactor.css') }}" rel="stylesheet">
@endpush